package com.donleo.security.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.donleo.security.common.CommonResult;
import com.donleo.security.model.Permission;
import com.donleo.security.model.User;
import com.donleo.security.vo.LoginParams;

import java.util.List;

/**
 * @author liangd
 * @since 2021-01-15 17:31
 */
public interface UserService extends IService<User> {
    /**
     * 根据用户编号查询
     */
    User getUserByCode(String code);

    /**
     * 根据用户编号查询用户权限
     */
    List<Permission> getPermissionsByUserCode(String userCode);

    /**
     * 用户登录
     */
    String login(LoginParams loginParams);

    /**
     * 验证权限
     */
    CommonResult checkAuth(String userCode, String uri);
}
